﻿@model Data.DBModels.Website
@using WebIndex1.Extensions;

<a href="@Model.Url">@Model.Name</a>
@if (Helper.GetCookie("mode") == "edit" && Request.IsAuthenticated)
{
    <div id="@Model.Id.ToString("N")" class="editBox"></div>

    @Ajax.RawActionLink("<span class = \"glyphicon glyphicon-pencil\"></span>", "EditPopUp", "Website",
        new { id = @Model.Id },
        new AjaxOptions() { HttpMethod = "Get", InsertionMode = InsertionMode.Replace, UpdateTargetId = @Model.Id.ToString("N") }
        , null)


    @Ajax.RawActionLink("<span class = \"glyphicon glyphicon-remove\"></span>", "Delete", "Website",
        new { id = @Model.Id },
                new AjaxOptions() { HttpMethod = "Post", Confirm = "Are you sure you wish to delete this website?", InsertionMode = InsertionMode.Replace, UpdateTargetId = "displayAllCategories" }
                , null)
}
